package com.project.UI.news;

import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;
import android.widget.ScrollView;

import com.example.mybaseproject.R;
import com.project.baseApp.BaseFragment;
import com.support.pulltorefresh.PullToRefreshBase;
import com.support.pulltorefresh.PullToRefreshBase.OnRefreshListener2;
import com.support.pulltorefresh.PullToRefreshScrollView;

public class NewsFragment extends BaseFragment implements OnRefreshListener2<ScrollView> {
	private View v;
	private PullToRefreshScrollView ptrScrollView;
	private ViewPager viewPager;
	private ListView listView;
	private ScrollView scrollView;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		v = inflater.inflate(R.layout.fragment_news, container, false);
		ptrScrollView = (PullToRefreshScrollView) v.findViewById(R.id.fragment_ptr_scrollview);
		viewPager = (ViewPager) v.findViewById(R.id.fragmen_ptr_viewpager);
		listView = (ListView) v.findViewById(R.id.fragment_ptr_listview);
		scrollView = ptrScrollView.getRefreshableView();
		return v;
	}

	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
		ptrScrollView.setOnRefreshListener(this);
	}

	@Override
	public void onPullDownToRefresh(PullToRefreshBase<ScrollView> refreshView) {

	}

	@Override
	public void onPullUpToRefresh(PullToRefreshBase<ScrollView> refreshView) {
		// TODO Auto-generated method stub

	}

}
